home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
code
/
p_serlib.sit
/
Serial Library Source Code
/
get_write_flags.c
< prev
next >
Wrap
Text File
|
1989-07-27
|
1KB
|
62 lines
/***********************************************************************/
/*
/* get_write_flags.c
/* by Atul Butte
/* Copyright ⌐ 1989 by Microsoft Corporation
/* All Rights Reserved
/*
/* version 1.0
/*
/*
/* This module provides a routine which will set the configuration
/* flags.
/*
/***********************************************************************/
/***********************************************************************/
/*
/* get_write_flags
/*
/***********************************************************************/
void get_write_flags( psz, pfAddLF, pfIgnore, pfStrip8Bit, pfAbsorbEcho )
register char *psz; /* string holding configStr */
Boolean *pfAddLF; /* flag for adding linefeeds */
Boolean *pfIgnore; /* flag for ignoring escape chars */
Boolean *pfStrip8Bit; /* flag for stripping high bit */
Boolean *pfAbsorbEcho; /* flag for waiting for echo from host */
{
while( *psz != 0 ) {
switch( *psz ) {
case 'E':
*pfAbsorbEcho = fTrue;
break;
case 'e':
*pfAbsorbEcho = fFalse;
break;
case 'J':
*pfAddLF = fTrue;
break;
case 'j':
*pfAddLF = fFalse;
break;
case 'I':
*pfIgnore = fTrue;
break;
case 'i':
*pfIgnore = fFalse;
break;
case 'A':
*pfStrip8Bit = fTrue;
break;
case 'a':
*pfStrip8Bit = fFalse;
break;
}
psz++;
}
}